ReactiveInjectableComponentBase class¶
Attributes: [DebuggerDisplay("{ViewModel}, {Activated}")]
Defined in
Namespace: ReactiveUI.Blazor Assembly: ReactiveUI.Blazor.dll Full name: ReactiveUI.Blazor.ReactiveInjectableComponentBase<T> Modifiers: public
Summary¶
A base component for handling property changes and updating the Blazor view appropriately.
Applies to
net11.0, net10.0
Class hierarchy
classDiagram
class ReactiveInjectableComponentBase~T~
class ComponentBase
ComponentBase <|-- ReactiveInjectableComponentBase~T~
class IViewFor~T~ {
<<interface>>
}
IViewFor~T~ <|.. ReactiveInjectableComponentBase~T~
class IViewFor {
<<interface>>
}
IViewFor <|.. ReactiveInjectableComponentBase~T~
class IActivatableView {
<<interface>>
}
IActivatableView <|.. ReactiveInjectableComponentBase~T~
class INotifyPropertyChanged {
<<interface>>
}
INotifyPropertyChanged <|.. ReactiveInjectableComponentBase~T~
class IDisposable {
<<interface>>
}
IDisposable <|.. ReactiveInjectableComponentBase~T~
class ICanActivate {
<<interface>>
}
ICanActivate <|.. ReactiveInjectableComponentBase~T~
Inherits from: ComponentBase (opens in a new tab)
Implements: IViewFor<T>, IViewFor, IActivatableView, INotifyPropertyChanged (opens in a new tab), IDisposable (opens in a new tab), ICanActivate
Remarks¶
This component triggers StateHasChanged (opens in a new tab) when either the view model instance changes or the current view model raises PropertyChanged (opens in a new tab).
Trimming/AOT: this type avoids expression-tree-based ReactiveUI helpers (e.g. WhenAnyValue) and uses event-based observables instead.
The ViewModel is provided via DI using InjectAttribute (opens in a new tab).
Constructors¶
| Name | Summary |
|---|---|
| .ctor |
Properties¶
| Name | Summary |
|---|---|
| ViewModel | Gets or sets the view model displayed by the view. |
| Activated | Gets a observable which is triggered when the ViewModel is activated. |
| Deactivated | Gets a observable which is triggered when the ViewModel is deactivated. |
Methods¶
| Name | Summary |
|---|---|
| Dispose | Disposes the component and releases managed resources. |
| OnInitialized | Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree. |
| OnAfterRender | Method invoked after each time the component has rendered interactively and the UI has finished updating (for example, after elements have been added to the browser DOM). Any... |
| OnPropertyChanged | Invokes the property changed event. |
Events¶
| Name | Summary |
|---|---|
| PropertyChanged | Occurs when a property value changes. |
Inherited members
System.Object.Equals(System.Object)(opens in a new tab)System.Object.Equals(System.Object,System.Object)(opens in a new tab)System.Object.GetHashCode(opens in a new tab)System.Object.GetType(opens in a new tab)System.Object.MemberwiseClone(opens in a new tab)System.Object.ReferenceEquals(System.Object,System.Object)(opens in a new tab)System.Object.ToString(opens in a new tab)